package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.NursingPlanDto;
import com.zzyl.dto.NursingProjectPlan;
import com.zzyl.vo.NursingPlan;
import com.zzyl.vo.NursingPlanVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Description NursingPlanMapper
 * @Author Lwj
 * @Date 2024-08-27-16:16
 */
@Mapper
public interface NursingPlanMapper {
    /**
     * 护理计划管理
     * @return
     */
    List<NursingPlan> select();

    /**
     * 新增
     * @param nursingPlanDto
     */
    void insertNursingPlan(NursingPlanDto nursingPlanDto);

    /**
     * 新增
     * @param nursingProjectPlan
     */
    void insertNursingProjectPlan(List<NursingProjectPlan> nursingProjectPlan);

    /**
     * 条件分页查询
     * @param name
     * @param status
     * @return
     */
    Page<NursingPlan> selectByPage(String name, Integer status);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    NursingPlanDto selectById(Long id);

    /**
     * 根据ID查询护理计划实体
     * @param id ID
     * @return 护理计划实体
     */
    NursingPlanVo getById(Long id);


    /**
     * 修改
     * @param nursingPlanDto
     */
    void put(NursingPlanDto nursingPlanDto);

    /**
     * 修改NursingProjectPlan
     * @param projectPlan
     */
    void updateProjectPlan(NursingProjectPlan projectPlan);

    /**
     * 删除Plan
     * @param id
     */
    void deleteByPlanId(Long id);

    /**
     * 删除Planprojrect
     * @param id
     */
    void deleteByPlanprojrectId(Long id);

    /**
     * 启用禁用
     * @param id
     * @param status
     */
    void updateStatus(Long id, int status);

    /**
     * 查询所有护理计划实体
     * @return 护理计划实体列表
     */
    List<NursingPlanVo> listAll();

    Long getCount(Long id);
}
